{template nheader.html}
<div class="page-bar">
	<ul class="page-breadcrumb mylink">
		{$menu.link}

	</ul>
	<ul class="page-breadcrumb myname">
		{$menu.name}
	</ul>
	<div class="page-toolbar">
		<div class="btn-group pull-right">
			<button type="button" class="btn green btn-sm btn-outline dropdown-toggle" data-toggle="dropdown" aria-expanded="false" data-hover="dropdown"> {fc_lang('操作菜单')}
				<i class="fa fa-angle-down"></i>
			</button>
			<ul class="dropdown-menu pull-right" role="menu">
				{loop $menu.quick $t}
				<li>
					<a href="{$t.url}">{$t.icon} {$t.name}</a>
				</li>
				{/loop}
				<li class="divider"> </li>
				<li>
					<a href="javascript:window.location.reload();">
						<i class="icon-refresh"></i> {fc_lang('刷新页面')}</a>
				</li>
			</ul>
		</div>
	</div>
</div>
{if $flag}
<h3 class="page-title">
	<small>{fc_lang('空间推荐位用于对会员空间进行归档管理，如达人空间，推荐空间，优秀空间等等')}</small>
</h3>
{else}
<div class="mytopsearch">
	<form method="post" action="" name="searchform" id="searchform">
		<label>{fc_lang('空间名称')}：</label>
		<label><input type="text" class="form-control" value="{$param.keyword}" name="data[keyword]" /></label>
		<label>{fc_lang('状态')}：</label>
		<label><select class="form-control" name="data[status]">
			<option value=""> -- </option>
			<option value="1"> {fc_lang('已审核')} </option>
			<option value="0"> {fc_lang('未审核')} </option>
		</select></label>
		<label><button type="submit" class="btn green btn-sm"> <i class="fa fa-search"></i> {fc_lang('搜索')}</button></label>
	</form>
</div>
{/if}

<form action="" method="post" name="myform" id="myform">
	<input name="action" id="action" type="hidden" value="del" />
	<div class="portlet mylistbody">
		<div class="portlet-body">
			<div class="table-scrollable">

				<table class="mytable table table-striped table-bordered table-hover table-checkable dataTable">

		<thead>
		<tr>
			<th width="10" align="right"></th>
			<th width="50" align="center">{fc_lang('排序')}</th>
			<th align="left">Uid</th>
			<th class="{ns_sorting('name')}" name="name" align="left">{$name}</th>
			<th class="{ns_sorting('username')}" name="username" align="left">{fc_lang('会员名称')}</th>
			<th class="{ns_sorting('groupid')}" name="groupid" align="left">{fc_lang('会员组')}</th>
			<th class="{ns_sorting('hits')}" name="hits" align="center">{fc_lang('点击量')}</th>
			<th class="{ns_sorting('status')}" name="status" align="center">{fc_lang('状态')}</th>
			<th class="{ns_sorting('regtime')}" name="regtime" align="left">{fc_lang('注册时间')}</th>
			<th align="left" class="dr_option">{fc_lang('操作')}</th>
		</tr>
		</thead>
		<tbody>
		{loop $list $t}
		<tr id="dr_row_{$t.uid}">
			<td align="right"><input name="ids[]" type="checkbox" class="dr_select toggle md-check" value="{$t.uid}" /></td>
			<td align="center"><input class="input-text displayorder" type="text" name="data[{$t.uid}][displayorder]" value="{$t.displayorder}" /></td>
			<td align="left">{$t.uid}</td>
			<td align="left">{dr_keyword_highlight($t.name, $param.keyword)}</td>
			<td align="left"><a onclick="dr_dialog_member('{$t.uid}')" href="javascript:;">{dr_strcut($t.username, 10)}</a></td>
			<td align="left"><font {if $t.groupid==1}color="#FF0000"{/if}>{MEMBER.group.$t[groupid].name}</font></td>
			<td align="">{$t.hits}</td>
			<td align="">{php echo $t.status ? '<font color="green">'.fc_lang('已审核').'</font>' : '<font color="#FF0000">'.fc_lang('未审核').'</font>';}</td>
			<td align="left">{dr_date($t.regtime, NULL, 'red')}</td>
			<td align="left" class="dr_option">
            <a class="ago" href="{SITE_URL}index.php?s=space&uid={$t.uid}" target="_blank"> <i class="fa fa-send"></i> {fc_lang('访问')}</a>
            {if $this->ci->is_auth('member/admin/space/edit')}
                <a class="aedit" href="{dr_url('space/space/edit',array('uid'=>$t.uid))}"> <i class="fa fa-edit"></i> {fc_lang('修改')}</a>
            {/if}
			</td>
		</tr> 
		{/loop}
		<tr class="mtable_bottom">
        	<th width="20"  ><input class="toggle md-check" name="dr_select" id="dr_select" type="checkbox" onClick="dr_selected()" /></th>
			<td colspan="11" >
            {if $this->ci->is_auth('space/admin/space/del')}
				<label><button type="button" class="btn red btn-sm" name="option" onClick="$('#action').val('del');dr_confirm_set_all('{fc_lang('您确定要这样操作吗？')}')"><i class="fa fa-trash"></i> {fc_lang('删除')}</button></label>
            {/if}
            {if $this->ci->is_auth('space/admin/space/edit')}
				<label><button type="button" class="btn green btn-sm" name="option" onClick="$('#action').val('order');dr_confirm_set_all('{fc_lang('您确定要这样操作吗？')}')"><i class="fa fa-edit"></i> {fc_lang('排序')}</button></label>
					<label><button type="button" class="btn blue btn-sm" name="option" onClick="$('#action').val('update');dr_confirm_set_all('{fc_lang('您确定要这样操作吗？')}')" ><i class="fa fa-edit"></i> {fc_lang('修改为')}</button></label>
            <label><select class="form-control" name="status">
            <option value="1"> {fc_lang('已审核')} </option>
            <option value="0"> {fc_lang('未审核')} </option>
        	</select></label>
				<label><button type="button" class="btn green btn-sm" name="option" onClick="$('#action').val('flag');dr_confirm_set_all('{fc_lang('您确定要这样操作吗？')}')" ><i class="fa fa-edit"></i> {fc_lang('推送')}</button></label>
				<label><select class="form-control" name="flagid">
            <option value=""> --- </option>
            {if $get.flag}<option value="-{$get['flag']}">{fc_lang('取消推荐')}</option>{/if}
			{loop $flags $i $t}
			{if $t.name}<option value="{$i}">{$t.name}</option>{/if}
			{/loop}
			</select></label>
            {/if}
			</td>
		</tr>
		</tbody>
		</table>
		</div>
	</div>
</div>
</form>
<div id="pages"><a>{fc_lang('共%s条', $param['total'])}</a>{$pages}</div>
{template nfooter.html}